package com.example.park_2306.fg

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.view.get
import com.alibaba.android.arouter.launcher.ARouter
import com.example.base.mvi.BaseViewFragment
import com.example.park_2306.MainActivity
import com.example.park_2306.R
import com.example.park_2306.databinding.FragmentServiceBinding
import org.greenrobot.eventbus.util.ErrorDialogManager.SupportManagerFragment


class ServiceFragment : BaseViewFragment<FragmentServiceBinding>() {
    override fun getLayout(): Int  = R.layout.fragment_service

    override fun initView() {
        //获取activity中的bottom
      /*  val activity = activity as MainActivity
        activity.bottom.getOrCreateBadge(R.id.shopFragment).number = 12*/

        binding.park.setOnClickListener {
            start("/park/ParkActivity")
        }
        binding.car.setOnClickListener {
            start("/car/CarActivity")
        }
        binding.repair.setOnClickListener {
            start("/repair/RepairActivity")
        }
        binding.visit.setOnClickListener {
            start("/visit/VisitActivity")
        }
        binding.notice.setOnClickListener {
            start("/notice/NoticeActivity")
        }
        binding.news.setOnClickListener {
            start("/notice/NewsActivity")
        }
        binding.sign.setOnClickListener {
            start("/sign/SignActivity")
        }
    }

    fun start(path:String){
        ARouter.getInstance().build(path).navigation()
    }

}